package com.shaoyu.tools.event.core;

import java.util.concurrent.Callable;

/**
 * @author shaoyu
 * @date 2022/11/23 09:41
 */
public interface ConcurrentWrap {

    /**
     * 包装异步调用的Callable
     * @param callable
     * @param <V>
     * @return
     */
    default <V> Callable<V> warp(Callable<V> callable){
        return callable;
    };

    /**
     * 包装异步调用的Runnable
     * @param runnable
     * @return
     */
    default Runnable warp(Runnable runnable){
        return runnable;
    };

}
